home *** CD-ROM | disk | FTP | other *** search
/ SuperHack / SuperHack CD.bin / CODING / GRAPHICS / SIPP_30.ZIP / MAKEFILE < prev    next >
Encoding:
Text File  |  1993-04-01  |  2.8 KB  |  105 lines

  1. #             sipp - a 3-d rendering library
  2. #
  3. # Copyright  Equivalent Software HB
  4. #
  5. # This is the main Makefile for sipp version 3.0. This directory
  6. # contains three subdirectories:
  7. # libsipp: source code for the library itself.
  8. # demo:    source code for demonstrations and tests
  9. # doc:     standard manual pages for the library.
  10. #
  11. # You can either make the library and the tests/demos separately or 
  12. # you can make them all in one make session. 
  13. #
  14. # To create the library, just type 'make library'.
  15. # To make the demo programs, type 'make demos', but if you haven't 
  16. # made the library first, this will be made automatically for you by
  17. # the makefile in the demos directory.
  18. #
  19. # Before you can make anything, though, you may have to edit the 
  20. # following definitions:
  21.  
  22.  
  23. # If your C compiler doesn't grok the void type, uncomment the 
  24. # following line:
  25. #NOVOID = -Dvoid=int
  26.  
  27.  
  28. # If you don't have memcpy() and friends in your C library, or 
  29. # if you don't have memory.h in /usr/include, uncomment the
  30. # following line:
  31. #NOMEMCPY = -DNOMEMCPY
  32.  
  33.  
  34. # If you don't have alloca(), uncomment the following line:
  35. #ALLOCA = -DHAVE_NO_ALLOCA
  36.  
  37.  
  38. # LIBDIR is where libsipp.a will be placed when you make install.
  39. # INCLUDEDIR is where the include files will be placed when you make install.
  40. # MANDIR is where the manuals will be placed when you make install.
  41. # MANEXT is the extension the manuals will receive in MANDIR
  42.  
  43. LIBDIR = /usr/local/lib/
  44. INCLUDEDIR = /usr/local/include
  45. MANDIR = /usr/local/man/man3
  46. MANEXT = 3
  47.  
  48.  
  49. # Choose a suitable C compiler and appropriate flags:
  50. CC = gcc -traditional
  51. CFLAGS = -O2 -pipe
  52.  
  53.  
  54. # Choose a lexical analyzer generator:
  55. LEX = lex
  56.  
  57.  
  58. SHELL = /bin/sh
  59. RM = rm -f
  60.  
  61.  
  62. # ================================================================
  63. #           Don't change anything below this line.
  64. # ================================================================
  65.  
  66. DOCFILES = primitives.man shaders.man sipp.man sipp_pixmap.man geometric.man
  67.  
  68.  
  69. MAKEOPTS = CC="$(CC)" LEX="$(LEX)" \
  70.     CFLAGS="$(NOVOID) $(NOMEMCPY) $(ALLOCA) $(CFLAGS) -I../libsipp"
  71. ANIMMAKEOPTS = CC="$(CC)" \
  72.     CFLAGS="$(NOVOID) $(NOMEMCPY) $(ALLOCA) $(CFLAGS) -I../../libsipp"
  73.         
  74.  
  75. all: library demos
  76.  
  77. library:
  78.     cd libsipp; $(MAKE) $(MAKEOPTS) libsipp.a
  79.  
  80. demos:
  81.     cd demo; $(MAKE) $(MAKEOPTS) programs
  82.     cd demo/animation; $(MAKE) $(ANIMMAKEOPTS) all
  83.  
  84.  
  85. install: library
  86.     cd libsipp; $(MAKE) LIBDIR=$(LIBDIR) INCLUDEDIR=$(INCLUDEDIR) install
  87.     for i in $(DOCFILES) ; do \
  88.         cp doc/$$i $(MANDIR)/`basename $$i .man`.$(MANEXT); \
  89.     done
  90.  
  91.  
  92. clean:
  93.     $(RM) *~ *shar*
  94.     cd libsipp; $(MAKE) clean;
  95.     cd demo; $(MAKE) clean;
  96.     cd demo/animation; $(MAKE) clean;
  97.     cd doc; ls -1 | egrep -v \
  98.         \(\\.man$$\)\|\(\\.tex$$\)\|\(\\.texinfo$$\)\|\(\\.ps$$\) | xargs $(RM)
  99.  
  100.  
  101. shar: clean
  102.     shar -a -n sipp-3.0 -L 50 -o sipp-3.0.shar Makefile README CHANGES \
  103.         COMPATIBILITY INSTALL \
  104.     libsipp/* doc/* demo/*
  105.